import{ut as e}from"./B603vO-13smUKN.js";import{D as t,E as n,Ht as r,On as i,St as a,_ as o,b as s,ct as c,k as l,mt as u,o as d,qt as f,tr as p,vn as m}from"./CIxmKYxc4tZcJF.js";import{t as h}from"./AuTu7hII1ERTdj.js";import{t as g}from"./DJeJfhW-4iv1Az.js";import{a as _,n as v}from"./D6qfi2N61QUWEz.js";import{o as y,s as b}from"./BbxvatETxeTHf.js";import"./C3Xax3Tz4BagVD.js";var x=l({__name:`app-settings-workspace`,setup(l){let x=e(`page-settings-workspace`),S=b(),C=m(``),w=m(``);async function T(e){if(!e){C.value=``,w.value=``;return}let t=await v(e);C.value=t?.localTitle??``,w.value=t?.folderName??``}c(()=>T(y.workspace?.id)),r(()=>y.workspace?.id,e=>T(e));async function E(){let e=y.workspace?.id;if(!e)return;let t=C.value.trim();x(`save local title`,e,t),await _(e,{localTitle:t||void 0}),y.workspaces[e]={id:e,title:t||w.value||``}}return(e,r)=>{let c=a(`router-link`);return u(),s(d,null,[o(`h3`,null,p(e.$t(`settings.workspace.title`)),1),t(i(h),{modelValue:C.value,"onUpdate:modelValue":[r[0]||=e=>C.value=e,E],title:e.$t(`settings.workspace.labelTitle`),description:e.$t(`settings.workspace.descTitle`),placeholder:w.value||e.$t(`unnamed`),class:`full`,lazy:``},null,8,[`modelValue`,`title`,`description`,`placeholder`]),t(i(g),{title:e.$t(`settings.workspace.id`),description:e.$t(`settings.workspace.descId`)},{default:f(()=>[o(`pre`,null,p(i(y).workspace?.id),1)]),_:1},8,[`title`,`description`]),t(i(g),{title:`Admin`},{default:f(()=>[o(`p`,null,[t(c,{to:`/admin`},{default:f(()=>[...r[1]||=[n(` Open workspace admin `,-1)]]),_:1})])]),_:1}),t(i(g),null,{default:f(()=>[o(`pre`,null,p(i(S)),1)]),_:1})],64)}}});export{x as default};